package com.zhuozhou.jdyc.main.base.adapter;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.zhuozhou.jdyc.R;
import com.zhuozhou.jdyc.base.BaseRecyclerViewAdapter;
import com.zhuozhou.jdyc.base.BaseViewHolder;
import com.zhuozhou.jdyc.databinding.ImageShowItemBinding;


/**
 * Created by 方舟 on 2017/10/20.
 * 视频列表
 */
public class ImageShowAdapter extends BaseRecyclerViewAdapter<String,ImageShowItemBinding> {

    public ImageShowAdapter(Context context) {
        super(context);
    }

    @Override
    protected int getLayoutId() {
        return R.layout.image_show_item;
    }

    @Override
    public void onBindHolder(BaseViewHolder<ImageShowItemBinding> viewHolder, int pos) {
        Glide.with(mContext)
                .load(mList.get(pos))
                .apply(new RequestOptions().placeholder(R.mipmap.ic_default_image).error(R.mipmap.ic_default_image))
                .into(viewHolder.getBinding().cornerImage);
    }
}
